package com.bee.baselibrary.utils;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;

import java.io.File;

/**
 * Created time 2018/8/1.
 * Creator 南柯一梦丶 on
 * Personal signature 余生还长 何必慌张
 * Page description :
 */
public class ImageLoadUtils {

    public static void ImageLoad(String image_url, ImageView imageView, RequestOptions options, Context context) {
        Glide.with(context)
                .load(image_url)
                .apply(options)
                .into(imageView);
    }
    public static void ImageLoad(String image_url, ImageView imageView, Context context) {
        Glide.with(context)
                .load(image_url)
                .into(imageView);
    }
    public static void ImageLoad(int resourcesId, ImageView imageView, RequestOptions options, Context context) {
        Glide.with(context)
                .load(resourcesId)
                .apply(options)
                .into(imageView);
    }
    public static void ImageLoad(Drawable drawable, ImageView imageView, RequestOptions options, Context context) {
        Glide.with(context)
                .load(drawable)
                .apply(options)
                .into(imageView);
    }
    public static void ImageLoad(File imgFile, ImageView imageView, RequestOptions options, Context context) {
        Glide.with(context)
                .load(imgFile)
                .apply(options)
                .into(imageView);
    }

}
